package com.yang.paymentdemo.controller;


import com.yang.paymentdemo.config.WxPayConfig;
import com.yang.paymentdemo.vo.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author yxc
 * @date 2022/1/21
 **/

@Api(tags = "测试控制器")
@RestController
@RequestMapping("/api/test")
public class TestController {

    @Resource
    private WxPayConfig wxpayConfig;

    @GetMapping("/")
    public R getWxPayConfig(){
        String mchId = wxpayConfig.getMchId();
        return R.ok().data("mchId",mchId);
    }

}
